<%@page import="systems.AdsSystem"%>
<%@page import="helpers.UrlHelper"%>
<%@page import="entities.SiteConfig"%>
<%
SiteConfig siteConfig = (SiteConfig) request.getAttribute("config");
String title = (String) request.getParameter("title");
String description = (String) request.getParameter("description");
String keywords = (String) request.getParameter("keywords");
String ogSiteName = (String) request.getParameter("ogsite_name");
String ogTitle = (String) request.getParameter("ogtitle"); 
String ogUrl = (String) request.getParameter("ogurl");
String ogImage = (String) request.getParameter("ogimage");
String ogDescription = (String) request.getParameter("ogdescription");
String hasAdv = (String) request.getParameter("hasAdv");

if (title == null && siteConfig != null)
	title = siteConfig.getTitle();

if (description == null && siteConfig != null)
	description = siteConfig.getMetaDescription();

if (keywords == null && siteConfig != null)
	keywords = siteConfig.getMetaKeywords();

if (ogSiteName == null && siteConfig != null)
	ogSiteName = siteConfig.getSiteName();

if (ogTitle == null && siteConfig != null)
	ogTitle = siteConfig.getTitle();

if (ogDescription == null && siteConfig != null)
	ogDescription = siteConfig.getMetaDescription();

if (ogUrl == null)
	ogUrl = UrlHelper.getServerUrl(request);

if (ogImage == null)
	ogImage = UrlHelper.getServerUrl(request) + "/images/logo.png";

%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="Content-Type" content="text/html; charset=<%=siteConfig.getHttpCharacterSet().toUpperCase()%>" />
	<meta name="description" content="<%=description.replaceAll("[\"\']+", "")%>" >
	<meta name="Keywords" content="<%=keywords.replaceAll("[\"\']+", "")%>" >
	<meta itemprop="name" content="<%=ogTitle.replaceAll("[\"\']+", "")%>" />    
	<meta itemprop="description" content="<%=ogDescription %>" />
	<meta property="og:site_name" content="<%=ogSiteName %>" >
	<meta property="og:title" content="<%=ogTitle.replaceAll("[\"\']+", "")%>" >
	<meta property="og:url" content="<%=ogUrl%>" >
	<meta property="og:image" content="<%=ogImage%>" >
	<meta property="og:description" content="<%=ogDescription %>" >
	<title><%=title%></title>
    <!-- Bootstrap -->
    
    <link href="/css/bootstrap.css" rel="stylesheet" media="screen">
    <link href="/css/style.css" rel="stylesheet" media="screen">
    <link href="/css/color.css" rel="stylesheet" media="screen">
    <link href="/css/font-awesome.css" rel="stylesheet" media="screen">
    <script type="text/javascript" src="/js/jquery-1.7.2.min.js"></script>
	<script type="text/javascript" src="/js/bootstrap.js"></script>
 </head>
<body>
<!-- HEADER BEGIN -->
<header>
	<div id="nav-wrapper">
		<div class="container">
			<div class="row-fluid">
				<div class="span6">
					<div class="row-fluid">
						<nav id="header-nav" class="span12" role="navigation">
							<div class="menu-header-navigation-container">
								<ul class="menu">
									<li class="menu-item"><a href="/">Home</a></li>
									<li class="menu-item"><a href="/whois">Whois</a></li>
									<li class="menu-item"><a href="/ip">Check Ip</a></li>
									<li class="menu-item"><a href="/rip">Reverse Ip</a></li>
									<li class="menu-item"><a href="/kranking">Keyword</a></li>
								</ul>
							</div>
						</nav>
					</div>
				</div>
				<div class="span6 addthis">
					<!-- AddThis Button BEGIN -->				
					<div class="addthis_toolbox addthis_default_style ">
					<a class="addthis_button_facebook_like" fb:like:layout="button_count"></a>
					<a class="addthis_button_tweet" tw:via="showdomain"></a>
				
					<a class="addthis_button_google_plusone" g:plusone:size="medium"></a>
					<a class="addthis_counter addthis_pill_style"></a>
					</div>
		            <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=ra-4f4f217074402877"></script>
		            <!-- AddThis Button END -->
				</div>
			</div>
			
		</div>
	</div>
	
	<div id="logo_area">
		<div class="container clearfix">
			<div id="logo" class="pull-left">
				<h1 class="logo">
					<a href="/">
						Showsite.us
					</a>
				</h1>
				<p id="strapline">Show infomation and analysis of site</p>
			</div>
			<% if (hasAdv == null) { %>
			<div id="header_widget" class="pull-right">
				<div>
					<%=AdsSystem.getAds468x60() %>
				</div>
			</div>
			<% } %>
			
		</div>
	</div>
</header> 

<hr class="double">

<!-- HEADER END -->

<!-- MAIN BEGIN -->
<div id="main">
	<div class="container">